<template>
    <Layout v-slot="props">
        <div class="detail">
            <span>姓名</span>
            <span>{{ props.leaveData.studentName }}</span>
        </div>
        <div class="detail">
            <span>班级</span>
            <span>{{ props.leaveData.className }}</span>
        </div>
        <div class="detail">
            <span>班主任</span>
            <span>{{ props.leaveData.headTeacherName }}</span>
        </div>
        <div class="detail">
            <span>请假类型</span>
            <span v-if="props.leaveData.leaveType == 1">事假（因公请假）</span>
            <span v-else-if="props.leaveData.leaveType == 2">病假</span>
            <span v-else-if="props.leaveData.leaveType == 3">补假</span>
            <span v-else-if="props.leaveData.leaveType == 4">销假</span>
            <span v-else>事假（因私请假）</span>
        </div>
        <div class="detail">
            <span>放行时间</span>
            <span>{{ props.leaveData.startTime }}</span>
        </div>
        <div class="detail">
            <span>申请理由</span>
            <span>{{ props.leaveData.reason }}</span>
        </div>
        <div class="detail">
            <span>申请状态</span>
            <span v-if="props.leaveData.state === 16">班主任已通过</span>
            <span v-else-if="props.leaveData.state === 22">系部主任已通过</span>
            <span v-else-if="props.leaveData.state === 15">已拒绝</span>
            <span v-else-if="props.leaveData.state === 0">未审核</span>
            <span v-else>审核中</span>
        </div>
        <div class="detail">
            <span>审批人</span>
            <span v-if="props.vetting.headTeacher.detail">{{
                props.vetting.headTeacher.detail
            }}</span>
            <span v-else>暂无审批人</span>
        </div>
        <div
            class="detail"
            :class="{ noshow: !props.vetting.sapprover.detail !== '' }"
        >
            <span>第二审批人</span>
            <span v-if="props.vetting.sapprover">{{
                props.vetting.sapprover.detail
            }}</span>
        </div>
        <div
            class="detail"
            :class="{ noshow: !props.vetting.eapprover.detail !== '' }"
        >
            <span>最终审批人</span>
            <span v-if="props.vetting.eapprover">{{
                props.vetting.eapprover.detail
            }}</span>
        </div>
        <div class="detail">
            <span>是否离深</span>
            <span v-if="props.leaveData.leaveSz == 1">是</span>
            <span v-else>否</span>
        </div>
    </Layout>
    <p>注：实习生有效期为申请日期起7天内有效,不用每日重复申请</p>
    <p>如：申请时间为2021年1月1日,则有效时间至2021年1月7日</p>
</template>

<script setup>
import Layout from './component/Layout.vue';
</script>

<style lang="scss" scoped>
@import url('./style/records.scss');
p {
    width: 85vw;
    color: #d11f11;
    margin: 10rem auto;
    font-size: 10rem;
}
</style>
